<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>学生考勤信息</title>
</head>
<style>
    tr{
        text-align: center;
    }
</style>
<body>
<a href="/add"><button>添加信息</button></a>
<hr>
<table border="1" >
    <tr>
        <th>考勤编号</th>
        <th>学生编号</th>
        <th>学生姓名</th>
        <th>出勤时间</th>
        <th>出勤状况</th>
    </tr>

    <c:forEach items="${list}" var="s">
    <tr>
        <td>${s.aid}</td>
        <td>${s.sid}</td>
        <td>${s.sname}</td>
        <td>${s.date}</td>
        <td>
            <c:if test="${s.type==1}">
                已到
            </c:if>
            <c:if test="${s.type==2}">
                迟到
            </c:if>
            <c:if test="${s.type==3}">
                旷课
            </c:if>
        </td>
        </c:forEach>
    </tr>
</table>
</body>
</html>
